package com.hitown.model;
/** 
* @author  Naven
* @version 创建时间：2018年3月1日 下午4:21:22 
* 
*/
public class LayuiPage {
	
	private int page;	  
	
	private int limit;    //每页显示的数量
	
	private int start;
	
	private int end;
	
	public LayuiPage() {
		super();
	}
	public int getPage() {
		return page;
	}
	public void setPage(int page) {
		if(page <= 0){
			page = 1;
		}
		this.page = page;
	}
	public int getLimit() {
		return limit;
	}
	public void setLimit(int limit) {
		if (limit < 0)
			limit = 10;
		this.limit = limit;
	}
	public int getStart() {
		return start;
	}
	public void setStart(int start) {
		if (start < 0)
			start = 0;
		this.start = start;
	}
	public int getEnd() {
		return end;
	}
	public void setEnd(int end) {
		this.end = end;
	}
	
	public void init() {
		this.start = (this.page - 1) * this.limit;
		this.end = this.page * this.limit;
	}
	
}
